﻿<div class="layui-list-tool">
    <span></span>
</div>
<div class="layui-list-search">
    <div class="layui-form">
        <div class="layui-inline">
            <label class="layui-form-label">关键字</label>
            <div class="layui-input-inline">
                <input type="text" id="searchValue" placeholder="请输入名称" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline" style="width:95px">
                <button class="layui-btn layui-btn-sm search-btn" id="searchBtn">查  询</button>
            </div>
        </div>
    </div>
</div>
<div>
    <table class="layui-table" id="tableId" lay-filter="tableFilter"></table>
</div>

<script type="text/javascript">

    layui.use(["jquery",  "form", "table"], function () {
        var form = layui.form;
        var $ = layui.$;
        var table = layui.table;
        form.render();

        var InitData = function () {
            table.render({
                elem: '#tableId',
                cols: [[
                    { field: 'JobGroup', title: '分组', align: 'left', width: 80 },
                    { field: 'JobName', title: '名称', align: 'left', width: 200 },
                    { field: 'RunTime', title: '运行时间', align: 'left', width: 120 },
                    { field: 'StartTime', title: '开始时间', align: 'center', width: 180 },
                    { field: 'Succ', title: '状态', align: 'center', width: 80, },
                    { field: 'Exception', title: '异常', align: 'left' },
                ]
                ],
                url: '/jobrunlog/list',
                where: { SearchValue: $("#searchValue").val(), Succ: true },
                method: 'get',
                request: {
                    pageName: 'PageIndex',
                    limitName: 'PageSize'
                },
                response: {
                    statusName: 'statusCode',
                    statusCode: 10000,
                    msgName: 'msg',
                    countName: 'exted',
                    dataName: 'data'
                },
                text: {
                    none: '暂无相关数据'
                },
                page: true,
                limit: 10,
                limits: [10, 15, 25],
            });
        }

        InitData();

        $("#searchBtn").click(function () {
            InitData();
        });


    });

</script>
